<template>
	<!-- pop选择弹窗 -->
	<view class="pop">
		<u-popup v-model="popShow" :mode="position" :height="contentHeight">
			<view class="pop-content">
				<view class="pop-item" v-for="(item,index) in itemList" @click="itemClick(index)">
					<icon-text :showIcon="item.iconShow" :iconPath="item.icon" :iconPosition="item.iconPosition" :iconText="item.iconText"></icon-text>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import iconText from '@/components/icon-text.vue'
	export default{
		components:{
			iconText
		},
		data(){
			return{
				
			}
		},
		props:{
			itemList:{
				type:Array,
				default:[]
			},
			position:{
				type:String,
				default:'bottom'
			},
			contentHeight:{
				type:String,
				default:'400rpx'
			},
			popShow:{
				type:Boolean,
				default:false
			}
		},
		methods:{
			itemClick(index){
				this.$emit('itemClick',index)
			}
		}
		
	}
</script>

<style scoped lang="scss">
	.pop-content{
		height: 100%;
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		.pop-item{
			width: 100%;
			padding: 30rpx 0;
			display: flex;
			flex-direction: row;
			justify-content: center;
			align-items: center;
		}
	}
</style>
